/**
 * js 组件存放处
 */

//  <!-- index  导航  -->
Vue.component('custom-tabber', {

    methods: {
        back: function () {
            window.history.back()
        }
    },
    template: `
    <div class="tabber">
    <div class="active">
        <img src="./images/index/home.png" alt="">
        首页
    </div>
    <div>
        <img src="./images/index/tabber2.png" alt="">
        抽奖
                <a href="./views/choujiang.html"></a>

    </div>
    <div class="middle">
        <div class="tabber-add">
            +
        </div>
        抢购
                <a href="./views/qianggou.html"></a>

    </div>
    <div>
        <img src="./images/index/qiandao.png" alt="">
        签到
                <a href="./views/qiandao.html"></a>

    </div>
    <div>
        <img src="./images/index/wode.png" alt="">
        我的
                <a href="./views/user.html"></a>

    </div>
</div>   
    `
})


//  <!-- index  导航  -->
Vue.component('custom-tabber1', {
    props: {
        page: {
            type: String,
            default: 'user'
        }
    },

    methods: {
        back: function () {
            window.history.back()
        }
    },
    template: `
    <div class="tabber">
    <div class="active">
        <img src="../images/index/home.png" alt="">
        首页
        <a href="/"></a>
    </div>
    <div>
        <img  v-if="page==qiandao" src="../images/qiandao/抽奖.png" alt="">
        <img  v-else src="../images/index/tabber2.png" alt="">
        抽奖
        <a href="./choujiang.html"></a>

    </div>
    <div class="middle">
        <div class="tabber-add">
            +
        </div>
        抢购
        <a href="./qianggou.html"></a>

    </div>
    <div>
        <img  v-if="page==qiandao" src="../images/qiandao/qiandao.png" alt="">
        <img  v-else src="../images/index/qiandao.png" alt="">
        签到
        <a href="./qiandao.html"></a>

    </div>
    <div>
        <img  v-if="page==user" src="../images/user/wode.png" alt="">
        <img  v-else src="../images/index/wode.png" alt="">
        <a href="./user.html"></a>
        
        我的
    </div>
</div>   
    `
})




